/* vinyls.css - Album carousel with Spotify player */

/* === Glass Container === */

.glass-container {
    position: relative;

    width: calc(100% - 10%);
    max-width: 1200px;

    margin: clamp(15px, 3vw, 40px) auto;
    padding: clamp(15px, 2vw, 25px) clamp(20px, 4vw, 50px);

    box-sizing: border-box;

    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;

    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}


/* === Album Title === */

.album-title {
    text-align: center;
    font-size: clamp(19px, 2.5vw, 25px);

    margin: 0 0 clamp(15px, 2vw, 25px);
    padding: 0;
}


/* === Cover Stack === */

/* One size controls the overall carousel scale */

.cover-stack {
    --cover-size: clamp(80px, 18vw, 250px);

    position: relative;
    isolation: isolate;

    width: var(--cover-size);
    aspect-ratio: 1;

    margin: 0 auto clamp(20px, 3vw, 30px);
}


/* === Individual Album Covers === */

/* Default state: covers are hidden until assigned a position class */

.cover-stack img {
    position: absolute;

    top: 50%;
    left: 35%;

    width: 30%;
    aspect-ratio: 1;

    transform: translateY(-50%);
    z-index: 1;

    object-fit: cover;

    border-radius: 3%;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);

    opacity: 0;
    pointer-events: none;

    transition:
        left 0.5s ease,
        width 0.5s ease,
        opacity 0.5s ease;
}


/* === Visible Carousel Slots === */

.cover-stack .front,
.cover-stack .next-one,
.cover-stack .next-two,
.cover-stack .next-three,
.cover-stack .prev-one,
.cover-stack .prev-two,
.cover-stack .prev-three {
    opacity: 1;
    pointer-events: auto;
}


/* Allow users to select another album by clicking its cover */

.cover-stack img:not(.front) {
    cursor: pointer;
}


/* === Active Album Cover === */

.cover-stack .front {
    left: 0;
    width: 100%;
    z-index: 5;
}


/* === Right-Side Album Covers === */

.cover-stack .next-one {
    left: 65%;
    width: 80%;
    z-index: 4;
}

.cover-stack .next-two {
    left: 120%;
    width: 60%;
    z-index: 3;
}

.cover-stack .next-three {
    left: 160%;
    width: 45%;
    z-index: 2;
}


/* === Left-Side Album Covers === */

.cover-stack .prev-one {
    left: -45%;
    width: 80%;
    z-index: 4;
}

.cover-stack .prev-two {
    left: -80%;
    width: 60%;
    z-index: 3;
}

.cover-stack .prev-three {
    left: -105%;
    width: 45%;
    z-index: 2;
}


/* === Covers Outside the Visible Carousel === */

.cover-stack .far-next {
    left: 200%;
    width: 30%;
}

.cover-stack .far-prev {
    left: -130%;
    width: 30%;
}


/* === Album Information === */

.album-details {
    text-align: center;

    font-size: clamp(15px, 2vw, 20px);

    margin-top: 5px;
    margin-bottom: 5px;

    padding: 0;
}


/* === Spotify Player === */

.album-player {
    width: min(100%, 360px);

    margin: 20px auto 0;
}

.album-player iframe {
    display: block;

    width: 100%;

    border-radius: 12px;
}


/* === Navigation Arrow Buttons === */

.button-arrow {
    position: absolute;

    bottom: clamp(20px, 3vw, 30px);

    width: 48px;
    padding: 0;

    font-size: 22px;
}


/* Previous Album Button */

.button-arrow-left {
    left: clamp(20px, 3vw, 30px);
}


/* Next Album Button */

.button-arrow-right {
    right: clamp(20px, 3vw, 30px);
}


/* === Responsive Layout === */

@media (max-width: 600px) {

    .glass-container {
        padding: 15px 15px 90px;
    }

    .album-title {
        margin-bottom: 15px;
    }

    .cover-stack {
        margin-bottom: 20px;
    }

    .album-player {
        width: 100%;
        max-width: 360px;
    }

    .button-arrow {
        bottom: 20px;
    }

    .button-arrow-left {
        left: 20px;
    }

    .button-arrow-right {
        right: 20px;
    }
}